.fx-badge {
  display: inline-block;
  position: relative;

  &.primary {
    > .mark {
      background-color: $color-primary;
    }
  }

  &.success {
    > .mark {
      background-color: $color-success;
    }
  }

  &.warning {
    > .mark {
      background-color: $color-warning;
    }
  }

  &.error {
    > .mark {
      background-color: $color-error;
    }
  }

  &.dot {
    > .mark {
      min-width: 10px !important;
      width: 10px !important;
      height: 10px !important;
      padding: 0;
      border-radius: 50%;
      border: 1px solid $badge-background;
      right: 5px;
    }
  }

  > .mark {
    box-sizing: border-box;
    color: $badge-background;
    display: inline-block;
    padding: 0 6px;
    position: absolute;
    min-width: 20px;
    height: 20px;
    line-height: 20px;
    border-radius: 10px;
    z-index: 10;
    top: 0;
    right: 10px;
    transform-origin: center center;
    transform: translateY(-50%) translateX(100%);
    white-space: nowrap;

    &.scale-enter-active {
      transform: translateY(-50%) translateX(100%) scale(1);
      transition: all 0.15s ease;
    }

    &.scale-leave-active {
      transform: translateY(-50%) translateX(100%) scale(1);
      transition: all 0.15s ease;
    }

    &.scale-enter-from {
      transform: translateY(-50%) translateX(100%) scale(0);
    }

    &.scale-leave-to {
      transform: translateY(-50%) translateX(100%) scale(0);
    }
  }
}
